﻿// -----------------------------------------------------------------------------
// 园丁,是个很简单的管理系统
//  gitee:https://gitee.com/hgflydream/Gardener 
//  issues:https://gitee.com/hgflydream/Gardener/issues 
// -----------------------------------------------------------------------------

using Gardener.Enums;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace Gardener.Application.Dtos
{
    /// <summary>
    /// 车辆数据转换实体
    /// </summary>
    public class CarDto
    {
        /// <summary>
        /// 用户id
        /// </summary>
        public int Id { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTimeOffset CreatedTime { get; set; }
        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTimeOffset? UpdatedTime { get; set; }
        /// <summary>
        /// 车牌号
        /// </summary>
        [Required(ErrorMessage = "不能为空"), MaxLength(32, ErrorMessage = "最大长度不能大于{1}")]
        public string CarNumber { get; set; }
        /// <summary>
        /// 昵称
        /// </summary>
        [MaxLength(32, ErrorMessage = "最大长度不能大于{1}")]
        public string Driver { get; set; }
        /// <summary>
        /// 昵称
        /// </summary>
        [MaxLength(32, ErrorMessage = "最大长度不能大于{1}")]
        public string Company { get; set; }
        /// <summary>
        /// 昵称
        /// </summary>
        [MaxLength(32, ErrorMessage = "最大长度不能大于{1}")]
        public string ApplyName { get; set; }
        /// <summary>
        /// 手机
        /// </summary>
        [MaxLength(20, ErrorMessage = "最大长度不能大于{1}")]
        public string PhoneNumber { get; set; }
        /// <summary>
        /// 是否锁定
        /// </summary>
        /*public bool IsLocked { get; set; }*/
        /// <summary>
        /// 审核通过
        /// </summary>
        [Required(ErrorMessage = "不能为空"), DefaultValue(false)]
        public PassType IsPass { get; set; }
        /// <summary>
        /// 是否放行
        /// </summary>
        [Required(ErrorMessage = "不能为空"), DefaultValue(false)]
        public bool IsRelease { get; set; }
    }
}
